package com.zxw.设计模式.结构型.桥接模式.test;

import com.zxw.设计模式.结构型.桥接模式.service.impl.划账.WxPay;
import com.zxw.设计模式.结构型.桥接模式.service.impl.划账.ZfbPay;
import com.zxw.设计模式.结构型.桥接模式.service.impl.风控.PayFaceMode;
import com.zxw.设计模式.结构型.桥接模式.service.impl.风控.PayFingerprintMode;
import com.zxw.设计模式.结构型.桥接模式.service.impl.风控.PayPasswordMode;

import java.math.BigDecimal;

/**
 * @projectName: util-cloud
 * @package: com.zxw.设计模式.结构型.桥接模式.test
 * @className: test
 * @author: zhangxuewei
 * @description: 测试桥接
 * @date: 2023/6/26 17:59
 * @version: 1.0
 */
public class test {

    static void pay(){
        System.out.println("微信支付：人脸识别支付");
        WxPay wxPay = new WxPay(new PayFaceMode());
        wxPay.transfer("wx_001","001",new BigDecimal(998));
        System.out.println();
        System.out.println("-------------------");
        System.out.println();
        System.out.println("支付宝支付：密码支付");
        ZfbPay zfbPay = new ZfbPay(new PayPasswordMode());
        zfbPay.transfer("zfb_001","001",new BigDecimal(998));
        System.out.println();
        System.out.println("-------------------");
        System.out.println();
        System.out.println("支付宝支付：指纹支付");
        ZfbPay zfbFPay = new ZfbPay(new PayFingerprintMode());
        zfbFPay.transfer("zfb_001","001",new BigDecimal(998));
    }

    public static void main(String[] args) {
        pay();
    }
}
